import service from './service';
/**
 * 执行过账
 * @param spaceid 系统空间id
 * @param systemid 数据库id
 * @param refsystemid 保存结果数据库id
 * @param modelid 模型ID,数据模型ID
 * @param doccode 单号
 * @param stepno 状态码
 * @param pageno 页面序号
 * @param root_table 根表, 默认属性一般使用根表
 * @example executeaccount(systemid, refsystemid, modelid, doccode, stepno, pageno, root_table, cache, force_update_cache);
 */
export default async function executeaccount(systemid: string, refsystemid: string, modelid: string, doccode: string, stepno: string, pageno: string, root_table: string, cache: boolean, force_update_cache: boolean) {
	const msg = {
		condition: {
			param: {
				doccode,
				pageno,
				root_table,
				stepno
			}
		},
		emptydataflag: 0,
		modeldefinition: ['tables', 'clientRef', 'ref', 'version', 'extInfo'],
		modelid,
		refsystemid,
		systemid
	};
	return await service('dataservice.executeaccount', msg, cache, force_update_cache);
}
